#ifndef DIAGNOSTIC3D_H
#define DIAGNOSTIC3D_H

#include "../Diagnostic/Diagnostic.h"
#include "../Input/PicParams.h"
#include "../Parallel/ParallelMPI.h"
#include "../Grid/Grid3D.h"
#include "../Field/Field3D.h"

class PSI;

class Diagnostic3D : public Diagnostic
{

public :

    Diagnostic3D(PicParams* params_, ParallelMPI* pmpi_, Grid* grid_, PhysicalField* fields_, vector<Species*>* vecSpecies_, vector<Collision*>* vecCollision_, vector<PSI*>* vecPSI_);
    virtual ~Diagnostic3D() {};

    //Runs the diag for all patches for local diags.
    virtual void run( ParallelMPI* pmpi, Grid* grid, vector<Species*>& vecSpecies, PhysicalField* fields, vector<PSI*>& vecPSI, int itime ){};

    int n_species;
    vector<int> dims_global;

    vector<Field3D<double>*> particleFlux;
    vector<Field3D<double>*> heatFlux;

    vector<Field3D<double>*> particleFlux_global;
    vector<Field3D<double>*> heatFlux_global;

    

    //calculate velocity and temperature of each species
    //not implemented
	void cal_VT(ParallelMPI* pmpi, vector<Species*>& vecSpecies, PhysicalField* fields, int itime){};

protected :
    double dx, dy, dz;
    double dx_inv_, dy_inv_, dz_inv_;
    int i_domain_begin, j_domain_begin, k_domain_begin;
    int dim_global;


};

#endif
